﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Principal;
using System.Text;
using System.Web;
using System.Web.Mvc;
using System.Web.Routing;
using System.Linq.Expressions;

using ERPStore.Models;

using NUnit.Framework;

using Moq;

namespace ERPStore.Tests
{
	public static class ControllerExtensions
	{
		public static void SetupControllerContext(this Controller controller, System.Web.HttpContextBase httpContext)
		{
			var routeData = new RouteData();
			var context = new ControllerContext(httpContext, routeData, controller);
			controller.ControllerContext = context;
			controller.Url = new UrlHelper(context.RequestContext, System.Web.Routing.RouteTable.Routes);
		}
	}
}
